﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CentaLine.Infrastructure
{
    /// <summary>
    ///  日志记录文件
    /// </summary>
   public class Logger
    {
       private static log4net.ILog log = null;
       private static log4net.ILog logDB = null;
       private static object lockHelper = new object();
       public static log4net.ILog Log
       {
           get {
               if (log == null)
               {
                   lock (lockHelper)
                   {
                       log = log4net.LogManager.GetLogger("MyLogger");
                   }
               }
               return log;
           }
       }
       public static log4net.ILog LogDB
       {
           get
           {
               if (logDB == null)
               {
                   lock (lockHelper)
                   {
                       logDB = log4net.LogManager.GetLogger("MyDBLogger");
                   }
               }
               return logDB;
           }
       }

        public static void LogInfo(string msg)
        {
            Log.Info(msg);
        }
    }
}
